function deformed_node_coordinate=cal_deformed_nodes(p,scale)
    % initial 
    deformed_node_coordinate=p.nodes;
    if p.problem_dimension==2
        index1=1:2:p.global_dof_num;
        index2=2:2:p.global_dof_num;
        deformed_node_coordinate(:,1)=deformed_node_coordinate(:,1)+p.displacements(index1)*scale;
        deformed_node_coordinate(:,2)=deformed_node_coordinate(:,2)+p.displacements(index2)*scale;
    elseif p.problem_dimension==3
        index1=1:3:p.global_dof_num;
        index2=2:3:p.global_dof_num;
        index3=3:3:p.global_dof_num;
        deformed_node_coordinate(:,1)=deformed_node_coordinate(:,1)+p.displacements(index1)*scale;
        deformed_node_coordinate(:,2)=deformed_node_coordinate(:,2)+p.displacements(index2)*scale;
        deformed_node_coordinate(:,3)=deformed_node_coordinate(:,3)+p.displacements(index3)*scale;
    end
end
